.class Llt/noframe/gpsfarmguide/dialogs/MeasuresDialogs$9$1;
.super Ljava/lang/Object;
.source "MeasuresDialogs.java"

# interfaces
.implements Landroid/content/DialogInterface$OnClickListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Llt/noframe/gpsfarmguide/dialogs/MeasuresDialogs$9;->onClick(Landroid/content/DialogInterface;I)V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Llt/noframe/gpsfarmguide/dialogs/MeasuresDialogs$9;


# direct methods
.method constructor <init>(Llt/noframe/gpsfarmguide/dialogs/MeasuresDialogs$9;)V
    .locals 0

    .line 192
    iput-object p1, p0, Llt/noframe/gpsfarmguide/dialogs/MeasuresDialogs$9$1;->this$0:Llt/noframe/gpsfarmguide/dialogs/MeasuresDialogs$9;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public onClick(Landroid/content/DialogInterface;I)V
    .locals 0

    .line 196
    :try_start_0
    invoke-static {}, Llt/noframe/gpsfarmguide/App;->getContext()Landroid/content/Context;

    move-result-object p1

    check-cast p1, Llt/noframe/gpsfarmguide/views/ActivityDrawer;

    invoke-virtual {p1}, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->getCurrentFragment()Landroidx/fragment/app/Fragment;

    move-result-object p1

    check-cast p1, Llt/noframe/gpsfarmguide/views/FragmentMeasuresList;

    iget-object p2, p0, Llt/noframe/gpsfarmguide/dialogs/MeasuresDialogs$9$1;->this$0:Llt/noframe/gpsfarmguide/dialogs/MeasuresDialogs$9;

    iget-object p2, p2, Llt/noframe/gpsfarmguide/dialogs/MeasuresDialogs$9;->val$measuringModel:Llt/noframe/gpsfarmguide/models/MeasuringModel;

    invoke-virtual {p2}, Llt/noframe/gpsfarmguide/models/MeasuringModel;->getId()I

    move-result p2

    invoke-virtual {p1, p2}, Llt/noframe/gpsfarmguide/views/FragmentMeasuresList;->removeItem(I)V

    .line 197
    invoke-static {}, Llt/noframe/gpsfarmguide/database/DB;->getDB()Llt/noframe/gpsfarmguide/database/DB;

    move-result-object p1

    iget-object p2, p0, Llt/noframe/gpsfarmguide/dialogs/MeasuresDialogs$9$1;->this$0:Llt/noframe/gpsfarmguide/dialogs/MeasuresDialogs$9;

    iget-object p2, p2, Llt/noframe/gpsfarmguide/dialogs/MeasuresDialogs$9;->val$measuringModel:Llt/noframe/gpsfarmguide/models/MeasuringModel;

    invoke-virtual {p1, p2}, Llt/noframe/gpsfarmguide/database/DB;->deleteMeasure(Llt/noframe/gpsfarmguide/models/MeasuringModel;)Z
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    move-exception p1

    .line 199
    invoke-virtual {p1}, Ljava/lang/Exception;->printStackTrace()V

    :goto_0
    return-void
.end method
